package com.example.demo.zabbix.request.builder.screen;

import com.example.demo.zabbix.request.BaseRequest;
import com.example.demo.zabbix.request.builder.request.CreateRequestBuilder;

import java.util.Map;

/**
 * https://www.zabbix.com/documentation/4.0/manual/api/reference/screenitem/create
 */
public class ScreenItemCreateRequestBuilder extends CreateRequestBuilder {
    private String screenId;
    private Integer resourceType;
    public ScreenItemCreateRequestBuilder(String auth) {
        super("screenitem.create", auth);
    }

    public ScreenItemCreateRequestBuilder(Long id, String auth) {
        super("screenitem.create", id, auth);
    }

    public String getScreenId() {
        return screenId;
    }

    public ScreenItemCreateRequestBuilder setScreenId(String screenId) {
        this.screenId = screenId;
        return this;
    }

    public Integer getResourceType() {
        return resourceType;
    }

    public ScreenItemCreateRequestBuilder setResourceType(Integer resourceType) {
        this.resourceType = resourceType;
        return this;
    }

    @Override
    public BaseRequest<Map<String, Object>> builder() {
        baseRequest.getParams().put("screenid",screenId);
        baseRequest.getParams().put("resourceType",resourceType);
        return baseRequest;
    }
}
